package com.example.computer_component_manager.util

import android.view.animation.Animation
import android.view.animation.TranslateAnimation

object AnimateUtil {

    fun getVisibleAnimation(): TranslateAnimation {
        val translateAnimation = TranslateAnimation(Animation.RELATIVE_TO_SELF,
            0f,
            Animation.RELATIVE_TO_SELF,
            0f,
            Animation.RELATIVE_TO_SELF,
            -0.5f,
            Animation.RELATIVE_TO_SELF,
            0f)
        translateAnimation.duration = 500
        return translateAnimation
    }

    fun getGoneAnimation(): TranslateAnimation {
        val translateAnimation = TranslateAnimation(Animation.RELATIVE_TO_SELF,
            0f,
            Animation.RELATIVE_TO_SELF,
            0f,
            Animation.RELATIVE_TO_SELF,
            0f,
            Animation.RELATIVE_TO_SELF,
            -1f)
        translateAnimation.duration = 500
        return translateAnimation
    }

}